.class public Les/l70;
.super Les/s80;
.source "ESRestoreTask.java"


# instance fields
.field protected D:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;"
        }
    .end annotation
.end field

.field E:Lcom/estrongs/fs/f;

.field F:Landroid/app/Activity;

.field G:Les/i70;

.field H:Ljava/lang/Object;

.field private I:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private J:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private K:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private L:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field M:J


# direct methods
.method public constructor <init>(Landroid/app/Activity;Lcom/estrongs/fs/f;Ljava/util/List;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/app/Activity;",
            "Lcom/estrongs/fs/f;",
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Les/s80;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 3
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Les/l70;->H:Ljava/lang/Object;

    .line 4
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Les/l70;->I:Ljava/util/List;

    .line 5
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Les/l70;->J:Ljava/util/List;

    .line 6
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Les/l70;->K:Ljava/util/List;

    .line 7
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Les/l70;->L:Ljava/util/List;

    const-wide/16 v0, 0x0

    .line 8
    iput-wide v0, p0, Les/l70;->M:J

    .line 9
    iput-object p2, p0, Les/l70;->E:Lcom/estrongs/fs/f;

    .line 10
    iput-object p3, p0, Les/l70;->D:Ljava/util/List;

    const/4 p2, 0x0

    .line 11
    iput-boolean p2, p0, Les/s80;->w:Z

    .line 12
    iput-object p1, p0, Les/l70;->F:Landroid/app/Activity;

    const/16 p1, 0x18

    .line 13
    iput p1, p0, Les/s80;->s:I

    return-void
.end method

.method private a(Lcom/estrongs/fs/g;)Ljava/lang/String;
    .locals 3

    .line 5
    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    const-string v0, "/.estrongs/recycle/"

    .line 6
    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, -0x1

    if-ne v0, v2, :cond_0

    return-object v1

    :cond_0
    const-string v0, "/es_recycle_content/"

    .line 7
    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_1

    return-object v1

    :cond_1
    const/4 v1, 0x0

    add-int/lit8 v0, v0, 0x14

    add-int/lit8 v0, v0, -0x1

    .line 8
    invoke-virtual {p1, v1, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method


# virtual methods
.method public varargs a(I[Ljava/lang/Object;)V
    .locals 5

    const/4 v0, 0x1

    if-eq p1, v0, :cond_0

    .line 1
    invoke-super {p0, p1, p2}, Les/s80;->a(I[Ljava/lang/Object;)V

    goto :goto_0

    .line 2
    :cond_0
    iget-object p1, p0, Les/s80;->c:Les/w80$a;

    iget-wide v1, p1, Les/w80$a;->d:J

    const/4 v3, 0x0

    aget-object v3, p2, v3

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    add-long/2addr v1, v3

    iput-wide v1, p1, Les/w80$a;->d:J

    .line 3
    iget-object p1, p0, Les/s80;->c:Les/w80$a;

    aget-object p2, p2, v0

    check-cast p2, Ljava/lang/String;

    iput-object p2, p1, Les/w80$a;->a:Ljava/lang/String;

    .line 4
    invoke-virtual {p0, p1}, Les/s80;->a(Les/w80$a;)V

    :goto_0
    return-void
.end method

.method protected r()V
    .locals 2

    .line 1
    invoke-super {p0}, Les/s80;->r()V

    .line 2
    :try_start_0
    iget-object v0, p0, Les/l70;->L:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 3
    iget-object v0, p0, Les/l70;->L:Ljava/util/List;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/estrongs/fs/impl/media/d;->a(Ljava/util/List;Ljava/util/Set;)V
    :try_end_0
    .catch Lcom/estrongs/fs/impl/media/MediaStoreInsertException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 4
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/utils/r;->b()V

    :cond_0
    :goto_0
    return-void
.end method

.method public s()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/l70;->H:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Les/l70;->G:Les/i70;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v1, :cond_0

    .line 3
    :try_start_1
    iget-object v1, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v1}, Les/z60;->s()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 4
    :catch_0
    :cond_0
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 5
    invoke-super {p0}, Les/s80;->s()V

    return-void

    :catchall_0
    move-exception v1

    .line 6
    :try_start_3
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v1
.end method

.method public y()Z
    .locals 12

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    .line 2
    iget-object v1, p0, Les/l70;->D:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x0

    const/4 v3, 0x0

    :goto_0
    const/4 v4, 0x4

    if-ge v3, v1, :cond_1

    .line 3
    iget-object v5, p0, Les/l70;->D:Ljava/util/List;

    invoke-interface {v5, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/estrongs/fs/g;

    invoke-interface {v5}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int/lit8 v5, v3, 0x1

    if-eq v5, v1, :cond_0

    const-string v6, " , "

    .line 4
    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    if-lt v3, v4, :cond_0

    const-string v1, "..."

    .line 5
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_1

    :cond_0
    move v3, v5

    goto :goto_0

    .line 6
    :cond_1
    :goto_1
    iget-object v1, p0, Les/s80;->c:Les/w80$a;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, v1, Les/w80$a;->j:Ljava/lang/String;

    .line 7
    iget-object v0, p0, Les/s80;->c:Les/w80$a;

    iget-object v1, p0, Les/l70;->D:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    int-to-long v5, v1

    iput-wide v5, v0, Les/w80$a;->c:J

    .line 8
    iget-object v0, p0, Les/s80;->c:Les/w80$a;

    iput-boolean v2, v0, Les/w80$a;->m:Z

    .line 9
    iput-boolean v2, v0, Les/w80$a;->l:Z

    .line 10
    iput-boolean v2, v0, Les/w80$a;->k:Z

    .line 11
    iput-boolean v2, v0, Les/w80$a;->n:Z

    const/4 v1, 0x1

    .line 12
    iput-boolean v1, v0, Les/w80$a;->o:Z

    .line 13
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    .line 14
    new-instance v3, Ljava/util/HashMap;

    invoke-direct {v3}, Ljava/util/HashMap;-><init>()V

    .line 15
    iget-object v5, p0, Les/l70;->D:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

    :cond_2
    :goto_2
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_5

    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/estrongs/fs/g;

    .line 16
    invoke-interface {v6}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Lcom/estrongs/android/util/h0;->L(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    if-nez v7, :cond_3

    goto :goto_2

    :cond_3
    const-string v8, "/"

    .line 17
    invoke-virtual {v7, v8}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v8

    invoke-virtual {v7, v2, v8}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v7

    .line 18
    invoke-interface {v3, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/util/ArrayList;

    if-nez v8, :cond_4

    .line 19
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    .line 20
    invoke-interface {v3, v7, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 21
    :cond_4
    invoke-virtual {v8, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 22
    invoke-direct {p0, v6}, Les/l70;->a(Lcom/estrongs/fs/g;)Ljava/lang/String;

    move-result-object v6

    if-eqz v6, :cond_2

    .line 23
    invoke-interface {v0, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 24
    :cond_5
    new-instance v5, Les/l70$a;

    invoke-direct {v5, p0}, Les/l70$a;-><init>(Les/l70;)V

    .line 25
    new-instance v6, Lcom/estrongs/android/pop/e;

    iget-object v7, p0, Les/l70;->F:Landroid/app/Activity;

    invoke-direct {v6, v7}, Lcom/estrongs/android/pop/e;-><init>(Landroid/content/Context;)V

    .line 26
    invoke-interface {v3}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v3

    invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_3
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_9

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/util/Map$Entry;

    .line 27
    iget-object v8, p0, Les/l70;->H:Ljava/lang/Object;

    monitor-enter v8

    .line 28
    :try_start_0
    invoke-virtual {p0}, Les/s80;->z()Z

    move-result v9

    if-eqz v9, :cond_8

    iget-object v9, p0, Les/l70;->G:Les/i70;

    if-eqz v9, :cond_6

    iget-object v9, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v9}, Les/s80;->z()Z

    move-result v9

    if-eqz v9, :cond_8

    .line 29
    :cond_6
    iget-object v2, p0, Les/l70;->G:Les/i70;

    if-eqz v2, :cond_7

    iget-object v2, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v2}, Les/s80;->m()I

    move-result v2

    if-eq v2, v4, :cond_7

    .line 30
    iget-object v2, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v2}, Les/s80;->l()Les/u80;

    move-result-object v2

    .line 31
    iget v3, v2, Les/u80;->a:I

    iget-object v2, v2, Les/u80;->b:Ljava/lang/Object;

    invoke-virtual {p0, v3, v2}, Les/s80;->b(ILjava/lang/Object;)V

    .line 32
    :cond_7
    monitor-exit v8

    goto/16 :goto_4

    .line 33
    :cond_8
    monitor-exit v8
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 34
    invoke-interface {v7}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/util/ArrayList;

    .line 35
    invoke-interface {v7}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/String;

    .line 36
    new-instance v9, Lcom/estrongs/fs/impl/local/d;

    new-instance v10, Ljava/io/File;

    invoke-direct {v10, v7}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v9, v10}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    const-wide/16 v10, 0x0

    .line 37
    iput-wide v10, p0, Les/l70;->M:J

    .line 38
    iget-object v7, p0, Les/l70;->H:Ljava/lang/Object;

    monitor-enter v7

    .line 39
    :try_start_1
    new-instance v10, Les/i70;

    iget-object v11, p0, Les/l70;->E:Lcom/estrongs/fs/f;

    invoke-direct {v10, v11, v8, v9}, Les/i70;-><init>(Lcom/estrongs/fs/f;Ljava/util/List;Lcom/estrongs/fs/g;)V

    iput-object v10, p0, Les/l70;->G:Les/i70;

    .line 40
    monitor-exit v7
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 41
    invoke-virtual {v10, p0}, Les/i70;->d(Les/s80;)V

    .line 42
    iget-object v7, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v7, v2}, Les/i70;->j(Z)V

    .line 43
    iget-object v7, p0, Les/l70;->G:Les/i70;

    iget-object v8, v7, Les/s80;->c:Les/w80$a;

    const/4 v9, 0x3

    iput v9, v8, Les/w80$a;->i:I

    .line 44
    iput-boolean v2, v8, Les/w80$a;->k:Z

    .line 45
    invoke-virtual {p0}, Les/s80;->h()Ljava/util/List;

    move-result-object v8

    invoke-virtual {v7, v8}, Les/s80;->a(Ljava/util/List;)V

    .line 46
    iget-object v7, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v7, v5}, Les/z60;->a(Les/w80;)V

    .line 47
    iget-object v7, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v7, v6}, Les/s80;->a(Les/v80;)V

    .line 48
    iget-object v7, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v7, v2}, Les/s80;->b(Z)V

    .line 49
    iget-object v7, p0, Les/l70;->I:Ljava/util/List;

    iget-object v8, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v8}, Les/i70;->M()Ljava/util/List;

    move-result-object v8

    invoke-interface {v7, v8}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 50
    iget-object v7, p0, Les/l70;->J:Ljava/util/List;

    iget-object v8, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v8}, Les/i70;->L()Ljava/util/List;

    move-result-object v8

    invoke-interface {v7, v8}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 51
    iget-object v7, p0, Les/l70;->K:Ljava/util/List;

    iget-object v8, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v8}, Les/i70;->N()Ljava/util/List;

    move-result-object v8

    invoke-interface {v7, v8}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 52
    iget-object v7, p0, Les/l70;->L:Ljava/util/List;

    iget-object v8, p0, Les/l70;->G:Les/i70;

    invoke-virtual {v8}, Les/i70;->J()Ljava/util/List;

    move-result-object v8

    invoke-interface {v7, v8}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    goto/16 :goto_3

    :catchall_0
    move-exception v0

    .line 53
    :try_start_2
    monitor-exit v7
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0

    :catchall_1
    move-exception v0

    .line 54
    :try_start_3
    monitor-exit v8
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    throw v0

    .line 55
    :cond_9
    :goto_4
    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_a
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_d

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 56
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    :goto_5
    if-eqz v3, :cond_a

    .line 57
    invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z

    move-result v2

    if-eqz v2, :cond_a

    .line 58
    invoke-virtual {v3}, Ljava/io/File;->list()[Ljava/lang/String;

    move-result-object v2

    const/4 v5, 0x0

    if-eqz v2, :cond_c

    .line 59
    array-length v2, v2

    if-nez v2, :cond_b

    goto :goto_7

    :cond_b
    :goto_6
    move-object v3, v5

    goto :goto_5

    .line 60
    :cond_c
    :goto_7
    invoke-virtual {v3}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v2

    .line 61
    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    if-eqz v2, :cond_b

    .line 62
    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    const-string v6, "/.estrongs/recycle"

    invoke-virtual {v3, v6}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_b

    move-object v5, v2

    goto :goto_6

    .line 63
    :cond_d
    invoke-virtual {p0}, Les/s80;->z()Z

    move-result v0

    if-nez v0, :cond_e

    .line 64
    invoke-virtual {p0, v4}, Les/s80;->a(I)V

    :cond_e
    return v1
.end method
